
import { createRouter, createWebHistory } from 'vue-router'
const HomeView = () => import('../views/HomeView.vue')
const AboutView = () => import('../views/AboutView.vue')
const HomeList = () => import('../components/HomeList.vue')
const HomeChoice = () => import('../components/HomeChoice.vue')
const routes = [
  {
    path: '',
    redirect: '/home'
  },
  {
    path: '/home',
    component: HomeView,
    children: [
      {
        path: 'list',
        component: HomeList
      },
      {
        path: 'choice',
        component: HomeChoice
      }
    ]
  },
  {
    path: '/about',
    component: AboutView
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})


export default router